package com.koron.device.mapper;

import com.koron.device.bean.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EquipmentChangeMapper {

    EquipmentChange getById(@Param("id") String id);

    EquipmentChangeVO getDetailById(@Param("id") String id);

    Boolean saveOrUpdate(EquipmentChange equipmentChange);

    List<EquipmentChangeVO> list(@Param("query")EquipmentChangeQuery query,@Param("language") String language);

    int delete(List<String> ids);

    int batchInsertEquips(List<ChangeEquip> equips);

    Boolean deleteEquipByChangeId(@Param("changeId") String changeId);

    /**
     * 查询最大编码
     * @param prefix
     * @return
     */
    String queryMaxCode(@Param("prefix") String prefix);

    /**
     * 批量新增参数
     * @param list
     * @return
     */
    int batchInsertParams(List<EquipmentChangeParam> list);

    /**
     * 删除参数
     * @param changeId
     * @return
     */
    int deleteParamByChangeId(@Param("changeId") String changeId);

    /**
     * 获取参数列表
     * @param changeId
     * @return
     */
    List<EquipmentChangeParam> getParamsByChangeId(@Param("changeId") String changeId);

    /**
     * 批量修改参数
     * @param list
     * @return
     */
    int batchUpdateParams(List<EquipmentChangeParam> list);
}
